
import request from "../utils/request";
export default {
    login(data) {
        return request({
            //admin abc+123
            url: '/user/login/web',
            method: 'post',
            data: data
        })
    },
    deviceList(data) {
        return request({
            url: '/info_board/info_board_device/getlist',
            method: 'post',
            data: data
        })
    },
    Pinarray(data){
        return request({
            url:'/info_board/udp/batch_ping',
            method: 'post',
            data: data
        })
    },
    devicecount() {
        return request({
            url: '/info_board/info_board_device/getcount',
            method: 'get'
        })
    },
    checkIsOnline() {
        return request({
            url: '/info_board/udp/isOnline',
            method: 'get'
        })
    },
    getInfoContent(device_id) {
        return request({
            url: `/info_board/udp/playing/${device_id}`,
            method: 'get'
        })
    },

    getBBSStatus(device_id) {
        return request({
            url: `/info_board/udp/getbbsstatus/${device_id}`,
            method: 'get'
        })
    },   
    getDeviceInfo(id) {
        return request({
            url: `/info_board/info_board_device/getById/${id}`,
            method: 'get'
        })
    },
    //设备厂家
    getDeviceFactory() {
        return request({
            url: '/user/sys_dict_data/getlist/info_board_factory',
            method: 'get'
        })
    },
    //设备型号
    getDeviceModel() {
        return request({
            url: '/user/sys_dict_data/getlist/info_board_model',
            method: 'get'
        })
    },
    //对齐方式
    getDeviceAlign() {
        return request({
            url: '/user/sys_dict_data/getlist/info_board_align',
            method: 'get'
        })
    },
    //播放方式
    getDeviceTransition() {
        return request({
            url: '/user/sys_dict_data/getlist/info_board_transition',
            method: 'get'
        })
    },
    //字体列表
    getInfoBoardFont() {
        return request({
            url: '/user/sys_dict_data/getlist/info_board_font',
            method: 'get'
        })
    },
    //字体大小列表
    getInfoBoardFontSize() {
        return request({
            url: `/user/sys_dict_data/getlist/info_board_font_size`,
            method: 'get'
        })
    },
    //字体颜色列表
    getInfoBoardFontColor() {
        return request({
            url: `/user/sys_dict_data/getlist/info_board_font_color`,
            method: 'get'
        })
    },
    getPlayList(data) {
        return request({
            url: '/info_board/info_board_play_list/getList',
            method: 'post',
            data
        })
    },
    msgadd(data) {
        return request({
            url: '/info_board/info_board_play_list/add',
            method: 'post',
            data
        })
    },
    getMsgByID(id) {
        return request({
            url: `/info_board/info_board_play_list/getById/${id}`,
            method: 'get'
        })
    },
    updateMsg(data) {
        console.log(222,data);
        return request({
            url: '/info_board/info_board_play_list/update',
            method: 'post',
            data
        })
    },
    DelMsg(id) {
        return request({
            url: `/info_board/info_board_play_list/delete/${id}`,
            method: 'get'
        })
    },
    sendMsg(device_id) {
        return request({
            url: `/info_board/udp/send/${device_id}`,
            method: 'get'
        })
    },
    pingInfoBoard(device_id) {
        return request({
            url: `/info_board/udp/ping/${device_id}`,
            method: 'get'
        })
    },
    getTempTree() {
        return request({
            url: '/info_board/info_board_template_node/getTree',
            method: 'get'
        })
    },
    TempAdd(data) {
        return request({
            url: '/info_board/info_board_template_node/add',
            method: 'post',
            data
        })
    },
    getTempByID(id) {
        return request({
            url: `/info_board/info_board_template_node/getById/${id}`,
            method: 'get'
        })
    },
    updTemp(data) {
        return request({
            url: '/info_board/info_board_template_node/update',
            method: 'post',
            data
        })
    },
    delTemp(id) {
        return request({
            url: `/info_board/info_board_template_node/delete/${id}`,
            method: 'get'
        })
    },
    getChildList(node_id) {
        return request({
            url: `/info_board/info_board_template/getList/${node_id}`,
            method: 'get'
        })
    },
    addtemplate(data) {
        return request({
            url: '/info_board/info_board_template/add',
            method: 'post',
            data
        })
    },
    getChildtempByID(id) {
        return request({
            url: `/info_board/info_board_template/getById/${id}`,
            method: 'get'
        })
    },
    updChildTemp(data) {
        return request({
            url: '/info_board/info_board_template/update',
            method: 'post',
            data
        })
    },
    delChildTemp(id) {
        return request({
            url: `/info_board/info_board_template/delete/${id}`,
            method: 'get'
        })
    },
    addMsgFromTemp(data) {
        return request({
            url: '/info_board/info_board_template/addPlayList',
            method: 'post',
            data
        })
    },
    sendAllMsg(device_id) {
        return request({
            url: `/info_board/udp/send/${device_id}`,
            method: 'get'
        })
    },
    removeAllMsg(device_id) {
        return request({
            url: `/info_board/info_board_play_list/clear/${device_id}`,
            method: 'get'
        })
    },
    getHisList(data) {
        return request({
            url: '/info_board/info_board_history_list/getpage',
            method: 'post',
            data
        })
    },
    addDevice(data) {
        return request({
            url: '/info_board/info_board_device/add',
            method: 'post',
            data
        })
    },
    DelDevice(id) {
        return request({
            url: `/info_board/info_board_device/delete/${id}`,
            method: 'get'
        })
    },
    getDeviceByID(id) {
        return request({
            url: `/info_board/info_board_device/getById/${id}`,
            method: 'get'
        })
    },
    updDevice(data) {
        return request({
            url: '/info_board/info_board_device/update',
            method: 'post',
            data
        })
    },
    getDirectionList() {
        return request({
            url: '/user/sys_dict_data/getlist/road_direction',
            method: 'get'
        })
    },
    getHighWayList() {
        return request({
            url: '/gis/high_way/getlist',
            method: 'post'
        })
    },
    republishHis(data) {
        return request({
            url: '/info_board/info_board_history_list/reSend',
            method: 'post',
            data
        })
    },
    changePSWD(data) {
        return request({
            url: '/user/user_manage/updatePassword',
            method: 'post',
            data
        })
    },
    getStakeList(data) {
        return request({
            url: '/gis/kilometre_stake/getlist',
            method: 'post',
            data
        })
    },
    getSFZlist(data) {
        return request({
            url: '/gis/toll_gate/getlist',
            method: 'post',
            data
        })
    },
    getFWQList(data) {
        return request({
            url: '/gis/road_facility/getlist',
            method: 'post',
            data
        })
    },
    MsgBatchsend(data) {
        return request({
            url: '/info_board/udp/send_batch',
            method: 'post',
            data
        })
    },
    getLineHis(data) {
        return request({
            url: '/info_board/info_board_offline_record/getpage',
            method: 'post',
            data
        })
    },
    getApplyList(data) {
        return request({
            url: '/info_board/send_apply/getpage',
            method: 'post',
            data
        })
    },
    getApplyByID(id) {
        return request({
            url: `/info_board/send_apply/getById/${id}`,
            method: 'get'
        })
    },
    ApplyAdd(data) {
        return request({
            url: '/info_board/send_apply/add',
            method: 'post',
            data
        })
    },
    withdrawApply(id) {
        return request({
            url: `/info_board/send_apply/withdraw/${id}`,
            method: 'get'
        })
    },
    passApply(data) {
        return request({
            url: `/info_board/send_apply/pass`,
            method: 'post',
            data
        })
    },
    rejectApply(data) {
        return request({
            url: `/info_board/send_apply/reject`,
            method: 'post',
            data
        })
    },
    getDeviceByApply(id){
        return request({
            url:`/info_board/send_apply/getDeviceList/${id}`,
            method: 'get'
        })
    },
    SaveAsMoudle(data){
        return request({
            url:'/info_board/info_board_play_list/addtemplate',
            method: 'post',
            data
        })
    },
    getSenstiveList(data){
        return request({
            url:'/info_board/sensitive_word/getpage',
            method: 'post',
            data
        })
    },
    getSenstiveByID(id){
        return request({
            url:`/info_board/sensitive_word/getById/${id}`,
            method: 'get'
        })
    },
    addSensitive(data){
        return request({
            url:'/info_board/sensitive_word/add',
            method: 'post',
            data
        })
    },
    updateSenstive(data){
        return request({
            url:'/info_board/sensitive_word/update',
            method: 'post',
            data
        })
    },
    DelSenstive(id){
        return request({
            url:`/info_board/sensitive_word/delete/${id}`,
            method: 'get'
        })
    },
    getDeviceState(device_id){
        return request({
            url:`/info_board/brightness/getProfile/${device_id}`,
            method:'get'
        })
    },
    getLight(device_id){
        return request({
            url:`/info_board/udp/getBrightness/${device_id}`,
            method:'get'
        })
    },
    setLight(data){
        return request({
            url:'/info_board/udp/editBrightness',
            method:'post',
            data
        })
    },
    setLightAuto(data){
        return request({
            url:'/info_board/udp/editBrightnessAuto',
            method:'post',
            data
        })
    },
    include(data){
        return request({
            url:'/info_board/sensitive_word/include',
            method:'post',
            data
        })
    },
    getRoadDevice(data){
        return request({
            url:'/gis/road_facility/getlist',
            method:'post',
            data
        })
    },
    getGLZList(data){
        return request({
            url:'/gis/kilometre_stake/getlist',
            method:'post',
            data
        })
    },
    getBBSClasslist(data){ ///获取情报板类别
        return request({
            url:'/user/sys_dict_data/getlist/info_board_model',
            method:'get',
            data
        })
    }
    ,addBBSClasslist(data){ ///获取情报板类别
        console.log(333,data);
        return request({
            url:'/user/sys_dict_data/add',
            method:'post',
            data
        })
    }
    ,upBBSClasslist(data){ ///修改情报板类别
        console.log(333,data);
        return request({
            url:'/user/sys_dict_data/update',
            method:'post',
            data
        })
    }
    ,delBBSClasslist(data){ ///修改情报板类别
        //console.log(333,data);
        return request({
            url:'/user/sys_dict_data/delete/'+data,
            method:'get'
        })
    }
}